﻿#include "GameFrameManager.h"
#include "DBOperator.h"

#include <map>
#include <sstream>

initialiseSingleton(GameFrameManager);

/**
 * 构造函数
 */
GameFrameManager::GameFrameManager()
{

}

/**
 * 析构函数
 */
GameFrameManager::~GameFrameManager()
{

}

void GameFrameManager::Subcriptions(std::string criptions,std::string password)
{
	char md5str[128];
	get_str_md5(criptions.c_str(),md5str);
	
    Json::Value root;
    root["MsgId"] = IDD_MESSAGE_SUSCRIPTIONS;
    root["scription"] = criptions;	
    root["password"] = password;	
    root["uniqueid"] = md5str;	        

    m_MolTcpSocketClient.Sendhtml5((char*)root.toStyledString().c_str(),root.toStyledString().length());
}

void GameFrameManager::OnProcessPubsucriptions(Json::Value &mes)
{
	LOG_BASIC("OnProcessPubsucriptions:%s",(char*)mes.toStyledString().c_str());
}

void GameFrameManager::OnProcessSubcriptions(Json::Value &mes)
{
	LOG_BASIC("OnProcessSubcriptions:%s",(char*)mes.toStyledString().c_str());
}

void GameFrameManager::OnProcessUnpubscriptions(Json::Value &mes)
{
	LOG_BASIC("OnProcessUnpubscriptions:%s",(char*)mes.toStyledString().c_str());
}



